import React from 'react';
import PropTypes from 'prop-types';
import { Button } from '@ant-design/react-native';
import FontAwesome from 'react-native-vector-icons/FontAwesome';

import styles from './styles';

const AddButton = ({ navigation, action, funList }) => (
    <Button
        style={styles.addButton}
        type="primary"
        onPress={() => navigation.push(action, { funList })}
    >
        <FontAwesome
            name="plus"
            size={25}
        />
    </Button>
);
AddButton.defaultProps = {
    action: '',
    funList: {},
};
AddButton.propTypes = {
    action: PropTypes.string,
    funList: PropTypes.objectOf(PropTypes.any),
};
export default AddButton;
